<template>
  <div id="app">
    <keep-alive exclude="Search,SearchResult,ArticleDetail,UserEdit">
      <router-view
    /></keep-alive>
  </div>
</template>
<script>
// 引入封装的api接口
import { getAllChannelsApi } from "../src/api/index.js";

export default {
  async created() {
    // try+catch异常捕获代码
    try {
      const res = await getAllChannelsApi();
      // console.log(res);
    } catch (err) {
      //err拿到的就是错误对象信息
      // 给用户来弹窗提示，程序出错
      // console.dir(err);
    }
  },
};
</script>
<style lang="less">
</style>
